package cn.fsd.query.delivery;

import cn.fsd.query.BaseQuery;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
// TODO: 2023/7/10 日期字段名称未统一，暂时冗余，需修改后端用到的地方和前端
public class PurchaseBillQuery extends BaseQuery {

  /**
   * 1代表按供应商查询，2代表按商品代码查询
   */
  Integer selectBy;

  String query;

  String storeroom_id;

  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
  Date startDate;

  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
  Date endDate;

  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
  Date start_date;

  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
  Date end_date;
}
